package com.wordutil;

import com.wordutil.wordentity.GenerateConfig;
import org.apache.poi.hwpf.usermodel.Table;

import java.util.List;

/**
 * @Author YongQiang
 * @Date 2021/4/6 14:41
 * @Version 1.0
 */
public class WordUtil {
    public static void main(String[] args) throws Exception {
        List<Table> tables = ReadWordTest.readTables("E:\\测试文档.doc");
        if (tables.size()>0){
            for (Table table : tables) {
                GenerateConfig generateConfig=GenerateConfig.getDefaultConfig();
                generateConfig.setAttributeOffset(1);
                generateConfig.setCommentOffset(5);
                WordService.generateFile(table,generateConfig);
            }
        }
    }
}
